import request from '@/http/request.js'
import qs from "qs"
// 请求Banner
export const getBanner = () => request.get('/banner')
//发送验证码请求
export const getCode = phone => request.post('/captcha/sent', `phone=${phone}`)
//发送热门推荐请求
export const getpersonalized = () => request.get('/personalized?limit=8')
// 请求歌单
//密码手机登录
export const getPwdLogin = (phone, password) => request.post('/login/cellphone', `phone=${phone}&password=${password}`)
//手机和验证码登录请求
export const getCodeLogin = (phone, captcha) => request.post('/login/cellphone', `phone=${phone}&captcha=${captcha}`)
//头像渲染
export const userApi = uid => request.get(`/user/detail?uid=${uid}`)
// 获取歌单
// export const getSongList = (data) => request.get(`/top/playlist?cat=${data.cat}&limit=35&offset=0`)
export const getSongList = (params) => request.get(`/top/playlist`,{params})
// 获取分类
export const getSongClassifyApi = () => request.get(`/playlist/catlist`);
//主播电台 分类
export const getcatelistApi = () => request.get(`/dj/catelist`)
// 主播电台页面的推荐节目
export const getrecommendApi = () => request.get(`/program/recommend`)
// 主播电台页面的节目排行版
export const gettoplistApi = () => request.get(`/dj/program/toplist?limit=10`)
//获取电台
export const getDjprogram = () => request.get('/personalized/djprogram')
//获取新碟上架
export const getNewest = () => request.get('/album/newest')
//获取榜单
export const getToplistApi = () => request.get('/toplist/detail')
//获取榜单歌曲信息
export const getPlaylistApi = (id) =>  request.get(`/playlist/detail?id=${id}`)
// 获取歌单详情(fyh)
export const getPlayListDetailApi = id => request.get(`/playlist/detail?id=${id}`)
// 歌单评论
export const getPlayListDetailCommentApi = id => request.get(`/comment/playlist?id=${id}`)
//主页签到
// export const getSignApi = (params) => request.post("/daily_signin",qs.stringify(params))
// 歌曲详情
export const getSongDetailApi = ids => request.get(`/song/detail?ids=${ids}`)
// 获取歌曲评论
export const getMusicCommentApi = id => request.get(`/comment/music?id=${id}`)
// 获取歌词
export const getLyricApi = id => request.get(`/lyric?id=${id}`)
// 获取歌曲url
export const getSongApi = id => request.get(`/song/url?id=${id}`)


